package org.duiduo.service;

import org.duiduo.api.bean.UserAddressVO;
import org.duiduo.api.bean.UserVO;
import org.duiduo.api.request.UserFindPageRequest;
import org.duiduo.api.request.UserLoginRequest;
import org.duiduo.api.request.UserRegisterRequest;
import org.duiduo.api.response.Page;
import org.duiduo.api.response.Result;
import org.duiduo.entity.User;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

public interface UserService {
    // User login(UserLoginRequest request);

    int register(UserRegisterRequest request);

    void save(UserVO userVO);

    void update(UserVO userVO);

    void delete(Long id);

    User getById(Long id);

    Page<UserVO> findPage(UserFindPageRequest request);

    List<User> selectAll();

    List<UserAddressVO> countAddress();

    List<User> findAll(User user);

    void export(HttpServletResponse response);

    Result upload(MultipartFile file);

    User getByUsername(String username);
}
